<?xml version="1.0" encoding="ISO-8859-1"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	template="/WEB-INF/templates/template.xhtml"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">
	<ui:define name="head">
    
    </ui:define>
   
   <ui:define name="actualizelogin" >
	<br />
	<br />
    <h:form id= "newpasswordform" rendered="#{appUser.userLogin == null and appUser.actualizePassword }">
		<center ><table width="420" class="formulario">
					<tr><td colspan="2">
							<div class="intro"><h:outputText value="#{messages.msgNewPassword}" styleClass = "outputtext" /></div>
						</td></tr>
					<tr>
						<td class="label"><b><h:outputText value="#{messages.userName}" styleClass = "outputtext"/></b></td>
						<td class="input"><h:inputText value="#{appUser.userName}" /></td>
					</tr>	
					<tr>
						<td class="label"><b><h:outputText value="#{messages.passwordCurrent }" styleClass = "outputtext"/></b></td>
						<td class="input"><h:inputSecret value="#{appUser.password}" /></td>
					</tr>
					<tr>
						<td class="label"><b><h:outputText value="#{messages.newPassword}" styleClass = "outputtext"/></b></td>
						<td class="input"><h:inputSecret value="#{appUser.newPassword}" /></td>
					</tr>
					<tr>
						<td class="label"><b><h:outputText value="#{messages.confirmNewPassword}" styleClass = "outputtext"/></b></td>
						<td class="input"><h:inputSecret value="#{appUser.confirmNewPassword}" /></td>
					</tr>
					<tr>
						<td align="center">
					   	  <h:commandLink action="home.jsf" actionListener="#{appUser.cancelChangePassword}" styleClass="commandLink">
					 			<h:commandButton value = "Cancelar"  styleClass="cancelarbutton" >
				 	 			<f:ajax event = "click" render="newpasswordform" immediate="true" execute="@form"></f:ajax>
				 	 			</h:commandButton>
    		    		</h:commandLink>
					    </td>
						<td align="center">
						 <h:commandButton action="#{appUser.changePasswordConfirm}" value="Aceptar" styleClass="guardarbutton" />
						</td>
					</tr>
					<tr>
						<td colspan="2" valign="bottom" align="center"><h:outputText value="#{messages.msgUserPasswordIncorrect}" rendered="#{appUser.userDontFoundActualize}" style="FONT-WEIGHT: bold; COLOR: #ff0000;" styleClass = "outputtext"/></td>
					</tr>
				</table></center>
			</h:form>
	 
	 
  </ui:define>
  
   <ui:define name="body">
  
  </ui:define>
  </ui:composition>
